Invitations

interface Invitations

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val pendingReceivedUserInvitations: List<Invitation>

Gets all pending received invitations

Link copied to clipboard
abstract val pendingSentUserInvitations: List<Invitation>

Gets all pending sent invitations

Link copied to clipboard
abstract val receivedUserInvitations: ArrayItemList<Invitation>

Gets all received invitations, you can listen to the changes on the returned object ArrayItemList

Link copied to clipboard
abstract val sentUserInvitations: ArrayItemList<Invitation>

Gets all sent invitations, you can listen to the changes on the returned object ArrayItemList

Functions

Link copied to clipboard
abstract fun acceptUserInvitation(invitationId: String?, listener: RainbowListener<Unit, Unit>? = null)

Accepts an invitation to join the user's network

Link copied to clipboard
abstract fun addRainbowContactToNetwork(contact: IRainbowContact?, listener: RainbowListener<Invitation, Unit>? = null)

Invites a contact to join our network, if an invitation already exists for this contact, it's resent

Link copied to clipboard
abstract fun cancelUserSentInvitation(invitation: Invitation?, listener: RainbowListener<Unit, Unit>? = null)

Cancels an invitation previously sent to a user Invitation can only be canceled if it's pending

Link copied to clipboard
abstract fun declineUserInvitation(invitationId: String?, listener: RainbowListener<Unit, Unit>? = null)

Declines an invitation to join the user's network

Link copied to clipboard
abstract fun getReceivedUserInvitationById(invitationId: String): Invitation?

Gets a received invitation by a given id

Link copied to clipboard
abstract fun getSentUserInvitationById(invitationId: String): Invitation?

Gets a sent invitation by a given id

Link copied to clipboard
abstract fun inviteUser(body: InviteUserBody, listener: RainbowListener<Invitation, Unit>? = null)

Sends an invitation using the InviteUserBody.Builder

Link copied to clipboard
abstract fun inviteUserByEmail(email: String?, listener: RainbowListener<Invitation, Unit>? = null)

Sends an email invitation to register an account on Rainbow

Link copied to clipboard
abstract fun inviteUserBySms(phoneNumber: String?, listener: RainbowListener<Invitation, Unit>? = null)

Creates an sms invitation to register an account on Rainbow Note that this method will not send an SMS to the contact, it generates an invitation url available in the callback onSuccess it's up to you to send an sms with this invitation link. See Intent.ACTION_SENDTO

Link copied to clipboard
abstract fun isContactInvited(contact: IRainbowContact): Boolean
Link copied to clipboard
abstract fun refreshReceivedInvitations(listener: RainbowListener<List<Invitation>, Unit>? = null)

Refresh the list of received invitations

Link copied to clipboard
abstract fun refreshSentInvitations(listener: RainbowListener<List<Invitation>, Unit>? = null)

Refresh the list of received invitations

Link copied to clipboard
abstract fun removeRainbowContactFromNetwork(contact: IRainbowContact?, listener: RainbowListener<Unit, Unit>? = null)

Removes a contact from our network